package org.alex.jdk8.test;

import java.awt.Button;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class StreamButton {
	public static void main(String[] args) {
		List<String> labels = Arrays.asList("root", "su", "admin", "guest");
		Stream<Button> streamBtns = labels.stream().map(Button::new);
//		List<Button> btns=streamBtns.collect(Collectors.toList());
//		btns.forEach(System.out::println);
		Button[] bs=streamBtns.toArray(Button[]::new);
		System.out.println(bs);
	}
}
